const { asyncQueue } = require("../dist/index.js");
let Q = new asyncQueue({
  retry: 3,
  max:4,
  endCallback: () => {
    console.log("完成");
  },
});

Q.run()
for (let i = 1; i <= 10; i++) {
  Q.run(() => {
    return new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve(i);
        console.log(i);
      }, 1000);
    });
  });
}
